package com.graduation.mybatis.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.graduation.mybatis.bean.Food;
import com.graduation.mybatis.bean.FoodEntries;
import com.graduation.mybatis.service.FoodEntriesService;
import com.graduation.mybatis.mapper.FoodEntriesMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
* @author 23726
* @description 针对表【food_entries】的数据库操作Service实现
* @createDate 2025-04-07 19:00:36
*/
@Service
public class FoodEntriesServiceImpl extends ServiceImpl<FoodEntriesMapper, FoodEntries>
    implements FoodEntriesService{

    @Resource
    private FoodEntriesMapper foodEntriesMapper;

    @Override
    public List<FoodEntries> queryByFoodId(Long foodId) {
        QueryWrapper<FoodEntries> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("food_id", foodId);
        return this.list(queryWrapper);
    }
}




